76. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2022-11-18 03:12:08 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

76.1 Files compared

#LocationFileLast Modified
12022-11-18 03:12:08 +0000
2Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Magento_PageBuilder/templates/catalog/product/widget/contentcarousel.phtml2022-11-02 04:23:54 +0000

76.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged00
Changed00
Inserted1303
Removed00

76.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

76.4 Active regular expressions

No regular expressions were active.

76.5 Comparison detail

    1 <?php
    2 /**
    3  * Copyright © Magento, Inc. All rights reserved.
    4  * See COPYING.txt for license details.
    5  */
    6 use Magento\Framework\App\Action\Action;
    7 
    8 // phpcs:disable Magento2.Templates.ThisInTemplate
    9 // phpcs:disable Generic.Files.LineLength.TooLong
    10 
    11 /** @var \Magento\CatalogWidget\Block\Product\ProductsList $block */
    12 ?>
    13 <?php
    14 /**
    15  * Product carousel widget template
    16  *
    17  * @var \Magento\Framework\Escaper $escaper
    18  */
    19  $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
    20  $_category_config = $_portohelper->getConfig('porto_settings/category');
    21  $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
    22  $_product_label_config = $_portohelper->getConfig('porto_settings/product_label');
    23  $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload');
    24  $product_type = $_category_grid_config['product_type'];
    25  $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
    26  $_helper = $this->helper('Magento\Catalog\Helper\Output');
    27 ?>
    28 <?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?>
    29     <?php
    30     $type = 'widget-product-carousel';
    31 
    32     $image = 'category_page_list';
    33     $hover_image = 'category_page_list-hover';
    34     $items = $block->getProductCollection()->getItems();
    35     $mode = 'grid';
    36     $showWishlist = true;
    37     $showCompare = true;
    38     $showCart = true;
    39     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
    40     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
    41     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
    42     $aspect_ratio = $_category_config['aspect_ratio'];
    43     if($aspect_ratio)
    44         $image_height = $image_width;
    45     ?>
    46     <ol class="product-items <?= /* @noEscape */ $type ?> products wrapper <?php if($product_type == 2): ?> no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>">
    47         <?php $iterator = 1; ?>
    48         <?php foreach ($items as $_item): ?>
    49             <?= /* @noEscape */ ($iterator++ == 1) ? '<li class="product-item">' : '</li><li class="product-item">' ?>
    50             <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid">
    51               <div class="product photo product-item-photo">
    52                 <a href="<?php echo $_item->getProductUrl() ?>" tabindex="-1">
    53                     <?php
    54                         if($_category_config['aspect_ratio'])
    55                             $productImage = $_imagehelper->init($_item, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
    56                         else
    57                             $productImage = $_imagehelper->init($_item, $image)->resize($image_width, $image_height);
    58                         $productImageUrl = $productImage->getUrl();
    59                     ?>
    60                         <img class="product-image-photo default_image<?php if(!$_lazyload): ?> porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php echo $productImage->getLabel(); ?>"/>
    61                     <?php if($_category_config['alternative_image']): ?>
    62                     <?php
    63                         if($_category_config['aspect_ratio'])
    64                             $productHoverImage = $_imagehelper->init($_item, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
    65                         else
    66                             $productHoverImage = $_imagehelper->init($_item, $hover_image)->resize($image_width, $image_height);
    67                         $productHoverImageUrl = $productHoverImage->getUrl();
    68                     ?>
    69                         <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
    70                         <img class="product-image-photo hover_image<?php if(!$_lazyload): ?> porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-<?php endif; ?>src="<?php echo $productHoverImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php echo $productHoverImage->getLabel(); ?>"/>
    71                         <?php endif; ?>
    72                     <?php endif; ?>
    73                 </a>
    74                 <?php
    75                     $product_label = "";
    76                     if($_product_label_config['sale_label']) {
    77                         if ($percentage = $_portohelper->getPercentage($_item)) {
    78                             if($_product_label_config['sale_label_percent']) {
    79                                 $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>';
    80                             } else {
    81                                 $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';
    82                             }
    83                         }
    84                     }
    85                     if($_product_label_config['new_label']) {
    86                         $now = date("Y-m-d");
    87                         $newsFrom= substr($_item->getData('news_from_date')?$_item->getData('news_from_date'):'',0,10);
    88                         $newsTo=  substr($_item->getData('news_to_date')?$_item->getData('news_to_date'):'',0,10);
    89 
    90                         if ($newsTo != '' || $newsFrom != ''){
    91                             if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {
    92                                 $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';
    93                             }
    94                         }
    95                     }
    96                     if($product_label)
    97                         echo '<div class="product-labels">'.$product_label.'</div>';
    98                 ?>
    99                 <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?>
    100                 <div class="product-item-inner">
    101                     <div class="product actions product-item-actions">
    102                         <div class="actions-primary">
    103                             <?php if ($_item->isSaleable()): ?>
    104                               <?php $postParams = $block->getAddToCartPostParams($_item); ?>
    105                               <form data-role="tocart-form" data-product-sku="<?= $block->escapeHtml($_item->getSku()) ?>" action="<?= $block->escapeUrl($postParams['action']) ?>" method="post">
    106                                   <input type="hidden" name="product" value="<?= $block->escapeHtmlAttr($postParams['data']['product']) ?>">
    107                                   <input type="hidden" name="<?= /* @noEscape */ Action::PARAM_NAME_URL_ENCODED ?>" value="<?= /* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED] ?>">
    108 
    109                                   <?php echo $block->getBlockHtml('formkey')?>
    110                                   <button type="submit"
    111                                           title="<?= $block->escapeHtml(__('Add to Cart')) ?>"
    112                                           class="action tocart primary">
    113                                       <span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
    114                                   </button>
    115                               </form>
    116                               <script type="text/x-magento-init">
    117                               {
    118                                   "[data-role=tocart-form], .form.map.checkout": {
    119                                       "catalogAddToCart": {
    120                                           "product_sku": "<?= $escaper->escapeJs($_item->getSku()); ?>"
    121                                       }
    122                                   }
    123                               }
    124                               </script>
    125                             <?php else: ?>
    126                                 <?php if ($_item->getIsSalable()): ?>
    127                                     <div class="stock available"><span><?php echo __('In stock') ?></span></div>
    128                                 <?php else: ?>
    129                                     <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
    130                                 <?php endif; ?>
    131                             <?php endif; ?>
    132                         </div>
    133                         <?php if ($mode == 'grid'): ?>
    134                         <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
    135                             <a href="#"
    136                                class="action towishlist actions-secondary"
    137                                title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    138                                aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    139                                data-post='<?php echo $block->getAddToWishlistParams($_item); ?>'
    140                                data-action="add-to-wishlist"
    141                                role="button">
    142                                 <span><?php echo __('Add to Wish List') ?></span>
    143                             </a>
    144                         <?php endif; ?>
    145                         <?php endif; ?>
    146                         <?php if($_category_config['addtocompare']): ?>
    147                         <?php
    148                         $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
    149                         ?>
    150                         <a href="#"
    151                            class="action tocompare actions-secondary"
    152                            title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
    153                            aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
    154                            data-post='<?php echo $compareHelper->getPostDataParams($_item); ?>'
    155                            role="button">
    156                             <span><?php echo __('Add to Compare') ?></span>
    157                         </a>
    158                         <?php endif; ?>
    159                     </div>
    160                 </div>
    161                 <?php endif; ?>
    162               </div>
    163                 <div class="product details product-item-details">
    164                   <?php
    165                       $_productNameStripped = $block->stripTags($_item->getName(), null, true);
    166                   ?>
    167                   <strong class="product name product-item-name">
    168                       <a class="product-item-link"
    169                          href="<?php echo $_item->getProductUrl() ?>">
    170                           <?php echo $_helper->productAttribute($_item, $_item->getName(), 'name'); ?>
    171                       </a>
    172                   </strong>
    173                   <?php if($_category_config['rating_star']): ?>
    174                   <?php
    175                       $review_html = $block->getReviewsSummaryHtml($_item, $templateType);
    176                   ?>
    177                   <?php if($review_html): ?>
    178                       <?php echo $review_html; ?>
    179                   <?php else: ?>
    180                   <div class="product-reviews-summary short">
    181                       <div class="rating-summary">
    182                           <span class="label"><span>Rating:</span></span>
    183                           <div class="rating-result" title="0%">
    184                               <span style="width:0"><span>0%</span></span>
    185                           </div>
    186                       </div>
    187                   </div>
    188                   <?php endif; ?>
    189                   <?php endif; ?>
    190 
    191                   <?php if($_category_config['product_price']): ?>
    192                   <?php echo $block->getProductPriceHtml($_item, $type); ?>
    193                   <?php endif; ?>
    194 
    195                   <?= $block->getProductDetailsHtml($_item) ?>
    196 
    197                   <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?>
    198                   <div class="product-item-inner">
    199                       <div class="product actions product-item-actions">
    200                           <?php if ($mode == 'grid'): ?>
    201                           <?php if($_category_config['addtowishlist'] && $product_type != 4): ?>
    202                           <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
    203                               <a href="#"
    204                                  class="action towishlist actions-secondary"
    205                                  title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    206                                  aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    207                                  data-post='<?php echo $block->getAddToWishlistParams($_item); ?>'
    208                                  data-action="add-to-wishlist"
    209                                  role="button">
    210                                   <span><?php echo __('Add to Wish List') ?></span>
    211                               </a>
    212                           <?php endif; ?>
    213                           <?php endif; ?>
    214                           <?php endif; ?>
    215                           <div class="actions-primary">
    216                               <?php if ($_item->isSaleable()): ?>
    217                                 <?php $postParams = $block->getAddToCartPostParams($_item); ?>
    218                                 <form data-role="tocart-form" data-product-sku="<?= $block->escapeHtml($_item->getSku()) ?>" action="<?= $block->escapeUrl($postParams['action']) ?>" method="post">
    219                                     <input type="hidden" name="product" value="<?= $block->escapeHtmlAttr($postParams['data']['product']) ?>">
    220                                     <input type="hidden" name="<?= /* @noEscape */ Action::PARAM_NAME_URL_ENCODED ?>" value="<?= /* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED] ?>">
    221                                     <?php if($product_type == 10):?>
    222                                         <div class="qty-box">
    223                                             <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>
    224                                             <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_item)?$this->getMinimalQty($_item):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>
    225                                             <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>
    226                                         </div>
    227                                     <?php endif;?>
    228                                     <?= $block->getBlockHtml('formkey') ?>
    229                                     <button type="submit"
    230                                             title="<?= $block->escapeHtml(__('Add to Cart')) ?>"
    231                                             class="action tocart primary">
    232                                         <span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
    233                                     </button>
    234                                 </form>
    235                                 <script type="text/x-magento-init">
    236                                 {
    237                                     "[data-role=tocart-form], .form.map.checkout": {
    238                                         "catalogAddToCart": {
    239                                             "product_sku": "<?= $escaper->escapeJs($_item->getSku()); ?>"
    240                                         }
    241                                     }
    242                                 }
    243                                 </script>
    244                               <?php else: ?>
    245                                   <?php if ($_item->getIsSalable()): ?>
    246                                       <div class="stock available"><span><?php echo __('In stock') ?></span></div>
    247                                   <?php else: ?>
    248                                       <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
    249                                   <?php endif; ?>
    250                               <?php endif; ?>
    251                           </div>
    252                           <?php if ($mode == 'grid'): ?>
    253                           <?php if($_category_config['addtowishlist'] && $product_type == 4): ?>
    254                           <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
    255                               <a href="#"
    256                                  class="action towishlist actions-secondary"
    257                                  title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    258                                  aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    259                                  data-post='<?php echo $block->getAddToWishlistParams($_item); ?>'
    260                                  data-action="add-to-wishlist"
    261                                  role="button">
    262                                   <span><?php echo __('Add to Wish List') ?></span>
    263                               </a>
    264                           <?php endif; ?>
    265                           <?php endif; ?>
    266                           <?php endif; ?>
    267                           <?php if ($mode == 'list'): ?>
    268                           <?php if($_category_config['addtowishlist']): ?>
    269                           <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
    270                               <a href="#"
    271                                  class="action towishlist actions-secondary"
    272                                  title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    273                                  aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
    274                                  data-post='<?php echo $block->getAddToWishlistParams($_item); ?>'
    275                                  data-action="add-to-wishlist"
    276                                  role="button">
    277                                   <span><?php echo __('Add to Wish List') ?></span>
    278                               </a>
    279                           <?php endif; ?>
    280                           <?php endif; ?>
    281                           <?php endif; ?>
    282                           <?php if($_category_config['addtocompare']): ?>
    283                           <?php
    284                           $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
    285                           ?>
    286                           <a href="#"
    287                              class="action tocompare actions-secondary"
    288                              title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
    289                              aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
    290                              data-post='<?php echo $compareHelper->getPostDataParams($_item); ?>'
    291                              role="button">
    292                               <span><?php echo __('Add to Compare') ?></span>
    293                           </a>
    294                           <?php endif; ?>
    295                       </div>
    296                   </div>
    297                   <?php endif; ?>
    298                 </div>
    299             </div>
    300             <?= ($iterator == count($items) + 1) ? '</li>' : '' ?>
    301         <?php endforeach ?>
    302     </ol>
    303 <?php endif;?>